import { createRouter, createWebHistory } from 'vue-router'
import CheckBasePage from "../views/checkBase.vue"
import CreateBasePage from '../views/createBase.vue'
import HelloPage from '../views/Hello.vue'
import AllBasePage from '../views/allBase.vue'
import StartClassPage from '../views/startClass.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: () => import('../views/HomeView.vue'),
    children: [
      {
        path: '',
        component: HelloPage
      },
      {
        path: '/one',
        component: CheckBasePage
      },
      {
        path: '/two',
        component: CreateBasePage
      },
      {
        path: '/hello',
        component: HelloPage
      },
      {
        path: '/three',
        component: AllBasePage
      },
      {
        path: '/four',
        component: StartClassPage
      }
    ]
  },
  // {
  //   name: 'startClass',
  //   path: '/startClass',
  //   //重定向页面
  //   redirect: '/start/basicInformation',

  //   // meta: { keepAlive: true },
  //   component: () => import('@/views/start/startClass.vue'),
  //   children: [
  //     {
  //       path: '/start/basicInformation',
  //       name: 'step-1',
  //       component: () => import( '../views/start/basicInformation.vue')

  //     },
  //     {
  //       path: '/start/configure',
  //       name: 'step-2',

  //       component: () => import( '../views/start/configure.vue')

  //     },
  //     {
  //       path: '/start/settingUp',
  //       name: 'step-3',
  //       component: () => import( '../views/start/settingUp.vue')

  //     },
      
  //   ]
  // },
  {
    path: '/about',
    name: 'about',
    component: () => import('../views/AboutView.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login.vue')
  },
  
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router


